package cn.scau.server.pojo;

import com.baomidou.mybatisplus.annotation.IdType;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author 代码不跑我先跑
 * @since 2025-03-30
 */
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Attendance对象", description="")
public class Attendance implements Serializable {
    // 公司规定的标准上下班时间（常量，非数据库字段）
    public static final LocalTime STANDARD_CHECK_IN_TIME = LocalTime.of(9, 0);  // 默认上班时间 09:00:00
    public static final LocalTime STANDARD_CHECK_OUT_TIME = LocalTime.of(17, 0);    // 默认下班时间 17:00:00
    public static final LocalTime CHECK_IN_TIME_START = LocalTime.of(8, 30);    // 08:30:00开始可以签到
    public static final LocalTime CHECK_OUT_TIME_END = LocalTime.of(8, 0);      // 08:00:00截止前一天的签退

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键ID")
    private Integer id;

    @ApiModelProperty(value = "员工ID")
    private String empId;

    @ApiModelProperty(value = "考勤日期")
    private LocalDate date;

    @ApiModelProperty(value = "签到时间")
    private LocalDateTime checkInTime;

    @ApiModelProperty(value = "签退时间")
    private LocalDateTime checkOutTime;

    @ApiModelProperty(value = "0未知 1请假 2出差 3正常签到 4迟到 5旷工 6早退 7部分出勤 8正常出勤")
    private Integer status;

    @ApiModelProperty(value = "签到补签标记")
    private Boolean isRepairIn;

    @ApiModelProperty(value = "签退补签标记")
    private Boolean isRepairOut;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEmpId() {
        return empId;
    }

    public void setEmpId(String empId) {
        this.empId = empId;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public LocalDateTime getCheckInTime() {
        return checkInTime;
    }

    public void setCheckInTime(LocalDateTime checkInTime) {
        this.checkInTime = checkInTime;
    }

    public LocalDateTime getCheckOutTime() {
        return checkOutTime;
    }

    public void setCheckOutTime(LocalDateTime checkOutTime) {
        this.checkOutTime = checkOutTime;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public Boolean getRepairIn() {
        return isRepairIn;
    }

    public void setRepairIn(Boolean repairIn) {
        isRepairIn = repairIn;
    }

    public Boolean getRepairOut() {
        return isRepairOut;
    }

    public void setRepairOut(Boolean repairOut) {
        isRepairOut = repairOut;
    }
}